A storage system routinely flushes data from cache memory to stripes that span underlying storage devices. To efficiently flush data, the storage system uses various algorithms. Each algorithm efficiently flushes data under different scenarios. For a scenario where data is stored in few segments of a stripe, the read-write-modify algorithm is efficient and inexpensive. However, in a scenario where data is stored in multiple segments throughout a stripe, the read-write-modify algorithm may cause numerous I/O operations. These numerous I/O operations may cause latency in I/O processing and degradation in the storage system's performance. Thus, when data is stored in multiple segments of a stripe, a full flush algorithm may be more effective.
As such, there is a need to identify an efficient algorithm that flushes cache data to a stripe.